<?php

function get_category_children ($cate, $pid) {
	$arr = array();
	foreach ($cate as $v) {
		if ($v['pid'] == $pid) {
			$arr[] = $v['id'];
			$arr = array_merge($arr, get_category_children($cate, $v['id']));
		}
	}
	return $arr;
}